projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32825a6
)
GtkEntry: Sanity check the end_pos value in _get_display_text()
author
Bastien Nocera
<hadess@hadess.net>
Wed, 6 Mar 2013 14:47:43 +0000
(15:47 +0100)
committer
Bastien Nocera
<hadess@hadess.net>
Wed, 6 Mar 2013 14:50:31 +0000
(15:50 +0100)
gtk/gtkentry.c
patch
|
blob
|
history
diff --git
a/gtk/gtkentry.c
b/gtk/gtkentry.c
index 159120473c8a323d598478645894c51c5ee1e856..e3553cc6ca3b085646be8c912a4b6a29dc33a80e 100644
(file)
--- a/
gtk/gtkentry.c
+++ b/
gtk/gtkentry.c
@@
-2901,7
+2901,7
@@
_gtk_entry_get_display_text (GtkEntry *entry,
text = gtk_entry_buffer_get_text (get_buffer (entry));
length = gtk_entry_buffer_get_length (get_buffer (entry));
- if (end_pos < 0)
+ if (end_pos < 0
|| end_pos > length
)
end_pos = length;
if (start_pos > length)
start_pos = length;